Adwaita: move the header-bar fill in a mixin.
authorLapo Calamandrei <calamandrei@gmail.com>
Mon, 1 Sep 2014 15:31:36 +0000 (17:31 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Mon, 1 Sep 2014 15:32:16 +0000 (17:32 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/_drawing.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index ec10e4627861d3520f11e7e0fd6a3ae925899deb..a35cb91a1c731949880943b94a0e4c4863ec3771 100644 (file)
@@ -932,18 +932,14 @@ GtkComboBox {
 
 .titlebar,
 .header-bar {
+  padding: 6px;
   border-width: 0 0 1px;
   border-style: solid;
   border-color: $borders_color;
   border-radius: 7px 7px 0 0;
-
   background-color: transparent;
-  background-image: linear-gradient(to bottom,
-                                    lighten($bg_color,4%),
-                                    $bg_color);
-  box-shadow: inset 0 -1px mix($borders_color, $bg_color, 30%), // bottom shade
-              inset 0 1px $top_hilight; // top highlight
-  padding: 6px;
+
+  @include headerbar_fill;
 
   &:backdrop {
     border-color: $backdrop_borders_color;
index f7fa72aef54edb713274098b8eac06ec510827b4..afcfc8aab773ff15291c7816fb237e2ade45e593 100644 (file)
@@ -404,3 +404,11 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
   background-image: linear-gradient(to $dir, $selected_bg_color 2px,
                                              lighten($selected_bg_color,6%));
 }
+
+@mixin headerbar_fill($c:$bg_color) {
+  background-image: linear-gradient(to bottom,
+                                    lighten($c,4%),
+                                    $c);
+  box-shadow: inset 0 -1px mix($borders_color, $c, 30%), // bottom shade
+              inset 0 1px $top_hilight; // top highlight
+}
index c899cd1bd4847948bfb36af76cde5ffdd88751ba..24e783f9a9117f682b4fb6233255909a2939a6fc 100644 (file)
@@ -1156,14 +1156,14 @@ GtkComboBox {
  ***************/
 .titlebar, GtkCalendar.header,
 .header-bar {
+  padding: 6px;
   border-width: 0 0 1px;
   border-style: solid;
   border-color: #1c1f1f;
   border-radius: 7px 7px 0 0;
   background-color: transparent;
   background-image: linear-gradient(to bottom, #434a4a, #393f3f);
-  box-shadow: inset 0 -1px #303535, inset 0 1px rgba(238, 238, 236, 0.1);
-  padding: 6px; }
+  box-shadow: inset 0 -1px #303535, inset 0 1px rgba(238, 238, 236, 0.1); }
   .titlebar:backdrop, GtkCalendar.header:backdrop,
   .header-bar:backdrop {
     border-color: #1e2222;
index 37335dfdc177859727cb9a31cd9c9b1c999a8706..d3612d5b0c5d2e19003593320ed25a3f993b3387 100644 (file)
@@ -1148,14 +1148,14 @@ GtkComboBox {
  ***************/
 .titlebar, GtkCalendar.header,
 .header-bar {
+  padding: 6px;
   border-width: 0 0 1px;
   border-style: solid;
   border-color: #a1a1a1;
   border-radius: 7px 7px 0 0;
   background-color: transparent;
   background-image: linear-gradient(to bottom, #f7f7f7, #ededed);
-  box-shadow: inset 0 -1px #d6d6d6, inset 0 1px white;
-  padding: 6px; }
+  box-shadow: inset 0 -1px #d6d6d6, inset 0 1px white; }
   .titlebar:backdrop, GtkCalendar.header:backdrop,
   .header-bar:backdrop {
     border-color: #a8a8a8;